package xcmg.device.infra.enums;

/**
 * 入库状态
 *
 * @author wangyong1015
 */
public enum InboundStatusEnum {

    NO_INBOUND(0, "未入库"),
    PART_INBOUND(1, "部分入库"),
    HAS_INBOUND(2, "已入库"),
    FORCE_INBOUND(3, "强制完成");

    private Integer status;

    private String desc;

    InboundStatusEnum(Integer status, String desc) {
        this.status = status;
        this.desc = desc;
    }

    public Integer getStatus() {
        return status;
    }

    public void setStatus(Integer status) {
        this.status = status;
    }

    public String getDesc() {
        return desc;
    }

    public void setDesc(String desc) {
        this.desc = desc;
    }

    public static String getDescByStatus(Integer status) {
        for (InboundStatusEnum statusEnum : InboundStatusEnum.values()) {
            if (statusEnum.getStatus().equals(status)) {
                return statusEnum.getDesc();
            }
        }
        return NO_INBOUND.getDesc();
    }
}
